<?php
class Admin_Model_Category extends Zend_Db_Table_Abstract{
	protected $_name = 'category';
	
	public function addCategory($name,$description,$order)
	{
		$row = $this->createRow();
		$row->categoryName = $name;
		$row->description = $description;
		$row->categories_ordered = $order;
		
		$row->save();
		$id = $this->_db->lastInsertId();
		return $id;
	}
	
	public function getCategoryList()
	{
		$select = $this->select();
		//$select->from('categories_news','categories_name');
		//$select->columns('categories_name');
		$result = $this->fetchAll($select);
		return $result;
	}
}